package com.yvon.maple.service.system.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yvon.boot.mybatis.model.BaseEntity;
import com.yvon.maple.enums.GenderEnum;
import com.yvon.maple.enums.UserTypeEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Set;

/**
 *
 * @author : yvon
 * @time : 2020-8-1
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName(value = "system_user")
public class User extends BaseEntity implements Serializable {

    /**
     * 密码
     */
    private String password;

    /**
     * 用户名
     */
    private String username;

    /**
     * 昵称
     */
    private String nickname;

    /**
     * 电话
     */
    private String phone;


    /**
     * 电话
     */
    private String email;

    /**
     * 头像
     */
    @TableField(exist = false)
    private Long avatar;

    /**
     * 性别(1-男，2-女，3-保密)默认为3
     */
    private GenderEnum gender;


    /**
     * Account non expired
     */
    private Boolean accountNonExpired = true;

    /**
     * Account non locked
     */
    private Boolean accountNonLocked = true;

    /**
     * Credentials non expired
     */
    private Boolean credentialsNonExpired = true;

    /**
     * Enabled
     */
    private Boolean enabled = true;

    @TableField(exist = false)
    private Set<Long> photo;

    private UserTypeEnum userType;
}
